package com.gzr.demo01;

// 创建线程方式二 实现runnable接口，重写run方法，执行线程需要丢入runnable接口实现类，调用start()方法
public class TestRunnable1 implements Runnable {
    public void run() {
        for (int i = 0; i < 200; i++) {
            System.out.println("我这看代码 run()"+i);
        }
    }

    public static void main(String[] args) {

        //创建线程
        TestThreade1 threade1 = new TestThreade1();

        //执行线程
        new Thread(threade1).start();


        for (int i = 0; i < 1000; i++) {
            System.out.println("我在学习多线程 main"+i);
        }
    }
}
